﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FormBase
{
    public partial class FToDo1 : Form
    {
        public FToDo1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            // TEST
            uint uiVal1 = 0;
            uint uiVal2 = 0;
            uint.TryParse(txtInput.Text, out uiVal1);
            byte[] ba1 = CBit.GetBytes(uiVal1);
            txtOutput.Text = CProject.gByteArrayToHex(ba1);

            if (CBit.BAToUInt32(ba1, 0, out uiVal2))
                txtOutput2.Text = uiVal2.ToString();
            else
                txtOutput2.Text = CBit.Message;
        }

        private void FToDo1_Load(object sender, EventArgs e)
        {
            txtInput.Text = "260610";

        }
    }
}
